package com.allwees.core.mq.rabbitmq.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.amqp.core.Binding.DestinationType;

import java.util.HashMap;
import java.util.Map;

/**
 * Binding metadata
 *
 * @author yangylsky
 * @since 2019-11-21
 *
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class BindingInfo {
	private String exchange;

	private String routingKey = "#";

	private String destination;

	private DestinationType destinationType = DestinationType.QUEUE;

	private Map<String, Object> arguments = new HashMap<>();

	public BindingInfo(String exchange, String routingKey, String destination) {
		this.exchange = exchange;
		this.routingKey = routingKey;
		this.destination = destination;
	}
}
